home *** CD-ROM | disk | FTP | other *** search
/ Erotic Games: Memory / Erotic Games: Memory.iso / mac / air_installers / AdobeAIR.exe / setup.swf / scripts / skins / SimpleScrollArrowSkin.as next >
Text File  |  2009-02-12  |  2KB  |  71 lines

  1. package skins
  2. {
  3.    import mx.controls.scrollClasses.ScrollBar;
  4.    import mx.skins.Border;
  5.    
  6.    public class SimpleScrollArrowSkin extends Border
  7.    {
  8.        
  9.       
  10.       public function SimpleScrollArrowSkin()
  11.       {
  12.          super();
  13.       }
  14.       
  15.       override public function get measuredWidth() : Number
  16.       {
  17.          return ScrollBar.THICKNESS;
  18.       }
  19.       
  20.       override public function get measuredHeight() : Number
  21.       {
  22.          return ScrollBar.THICKNESS;
  23.       }
  24.       
  25.       override protected function updateDisplayList(param1:Number, param2:Number) : void
  26.       {
  27.          super.updateDisplayList(param1,param2);
  28.          var _loc3_:uint = getStyle("arrowBorderColor");
  29.          var _loc4_:uint = getStyle("arrowFillColor");
  30.          var _loc5_:uint = getStyle("arrowOverFillColor");
  31.          var _loc6_:uint = getStyle("arrowIconColor");
  32.          var _loc7_:* = name.charAt(0) == "u";
  33.          graphics.clear();
  34.          switch(name)
  35.          {
  36.             case "upArrowUpSkin":
  37.             case "downArrowUpSkin":
  38.                drawRoundRect(1,1,param1 - 1,param2 - 1,0,_loc3_,1);
  39.                drawRoundRect(2,2,param1 - 3,param2 - 3,0,_loc4_,1);
  40.                break;
  41.             case "upArrowOverSkin":
  42.             case "upArrowDownSkin":
  43.             case "downArrowDownSkin":
  44.             case "downArrowOverSkin":
  45.                drawRoundRect(1,1,param1 - 1,param2 - 1,0,_loc3_,1);
  46.                drawRoundRect(2,2,param1 - 3,param2 - 3,0,_loc5_,1);
  47.                break;
  48.             default:
  49.                drawRoundRect(0,0,param1,param2,0,_loc4_,0);
  50.                return;
  51.          }
  52.          graphics.beginFill(_loc6_);
  53.          if(_loc7_)
  54.          {
  55.             graphics.moveTo(param1 / 2,6);
  56.             graphics.lineTo(param1 - 5,param2 - 6);
  57.             graphics.lineTo(5,param2 - 6);
  58.             graphics.lineTo(param1 / 2,6);
  59.          }
  60.          else
  61.          {
  62.             graphics.moveTo(param1 / 2,param2 - 6);
  63.             graphics.lineTo(param1 - 5,6);
  64.             graphics.lineTo(5,6);
  65.             graphics.lineTo(param1 / 2,param2 - 6);
  66.          }
  67.          graphics.endFill();
  68.       }
  69.    }
  70. }
  71.